package cn.sjxy.doctorms.service.impl;

import cn.sjxy.doctorms.domain.User;
import cn.sjxy.doctorms.mapper.UserMapper;
import cn.sjxy.doctorms.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public User findByUsername(String username) {
        User user = userMapper.findByUsername(username);
        return user;
    }

    @Override
    public void register(String username, String password) {
        userMapper.add(username,password);
    }
}
